<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>不可移动文物声像影片资料表单</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<script type="text/plain" id="myEditorFile"></script>
	<form id="umaudioForm" method="post">
		<div style="display: none">
			<input name="audioId" class="mini-textbox" id="audioId" /> <input
				id="relicsId" name="relicsId" class="mini-textbox" /> <input
				id="relicsName" name="relicsName" class="mini-textbox" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="10%" class="xx_bt nonebor">声像资料名称:</td>
					<td width="23%" class="xx_type  "><input name="audioName"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt nonebor">声像资料编号:</td>
					<td width="23%" class="xx_type  nonebor"><input
						name="audioNum" style="width: 90%;" class="mini-textbox"
						vtype="maxLength:100" /><span class="required_cls"> </span></td>
					<td width="10%" class="xx_bt nonebor">类别:</td>
					<td width="23%" class="xx_type  nonebor">
						<div id="combobox2" class="mini-combobox" name="audioType"
							style="width: 90%;" popupWidth="230" textField="dicValue"
							valueField="dicValue"
							url="${path}/mgr/dictionary/showListByKey?dicKey=35"
							multiSelect="true" showClose="false" oncloseclick="onCloseClick">
							<div property="columns">
								<div header="类型" field="dicValue"></div>
							</div>
						</div> <span class="required_cls"> </span>
					</td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">存放方位:</td>
					<td width="23%" class="xx_type  "><input name="storeDerecter"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">数量:</td>
					<td width="23%" class="xx_type  "><input name="number"
						style="width: 90%;" class="mini-textbox" vtype="float" /><span
						class="required_cls"> </span></td>
					<td width="10%" class="xx_bt ">规格:</td>
					<td width="23%" class="xx_type  "><input name="etalon"
						style="width: 90%;" class="mini-textbox" vtype="maxLength:100" /><span
						class="required_cls"> </span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">保存环境及要求:</td>
					<td class="xx_type" colspan="5"><input name="saveEnvironment"
						style="width: 97%;" class="mini-textarea" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">声像资料清单及附件:</td>
					<td width="90%" class="xx_type  " colspan="3"><input
						name="audioList" style="width: 80%;" class="mini-textarea"
						vtype="maxLength:100" /> <!-- 附件上传开始 --> <a class="mini-button"
						iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_AUDIO_01%>','showfiles')">浏览文件</a>
						<!-- 附件上传结束--></td>
					<td class="xx_type" id="showfiles" colspan="2"><c:if
							test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 1601}">
										<input type="hidden" value="${att.attachmentPath}"
											name="filePath">
										<input type="hidden" value="${att.attachmentName}"
											name="fileName">
										<input type="hidden" value="${att.attachmentOwner}"
											name="attachmentOwner">
										<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
										<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if></td>
				</tr>
				<tr>
					<td width="10%" class="xx_bt ">备注:</td>
					<td width="90%" class="xx_type  " colspan="3"><input
						name="common" style="width: 80%;" class="mini-textarea"
						vtype="maxLength:100" /> <!-- 附件上传开始 --> <a class="mini-button"
						iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_AUDIO_02%>','showfiles1')">浏览文件</a>
						<!-- 附件上传结束--></td>
					<td class="xx_type" id="showfiles1" colspan="2"><c:if
							test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<c:if test="${att.attachmentOwner == 1602}">
										<input type="hidden" value="${att.attachmentPath}"
											name="filePath">
										<input type="hidden" value="${att.attachmentName}"
											name="fileName">
										<input type="hidden" value="${att.attachmentOwner}"
											name="attachmentOwner">
										<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
										<br />
									</c:if>
								</c:forEach>
							</c:if>
						</c:if></td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<c:if test="${param.flag!='show'}">
				<a class="mini-button" onclick="addform.saveData" id="sub_button"
					iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			</c:if>
			<a iconCls="icon-cancel" class="mini-button"
				onclick="$.form.onClose()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="${path}/js/upload.js"></script>
<script type="text/javascript">
	var doc = $(document);
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#umaudioForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			$.form.saveData({
				url : "${path}/mgr/umaudio/addObj",
				showMsg : true,//是否显示提示信息（返回参数必须是msg，json类型数据）
				id : "umaudioForm"
			});
		};

	});
	//页面初始化时，执行该函数资源类型
	window.onload = function() {
		if (!mini.get("audioId").value > 0) {
			mini.get("relicsId").setValue("${param.relicsId}");
			mini.get("relicsName").setValue(decodeURI("${name}"));
		}
	};
	//页面初始化时，执行该函数资源类型
	$.form.loadFormSuccess = function() {
		if (!mini.get("audioId").value > 0) {
			mini.get("relicsId").setValue("${param.relicsId}");
			mini.get("relicsName").setValue(decodeURI("${name}"));
		}
	};
</script>
</html>